<template>
  <div class="home-container">
    <!-- 导航 -->
    <TypeNav></TypeNav>
    <!-- 列表 -->
    <ListContainer></ListContainer>
    <!-- 推荐 -->
    <Recommend></Recommend>
    <!-- 排名 -->
    <Rank></Rank>
    <!-- 猜你喜欢 -->
    <Like></Like>
    <!-- 家用电器 -->
    <Floor v-for="item in floorList" :key="item.id" :floor-item="item"> </Floor>
    <!-- 商标 -->
    <Brand></Brand>
  </div>
</template>

<script>
// 公共组件
import TypeNav from 'components/common/TypeNav'
// 子组件
import ListContainer from './homeChild/ListContainer.vue'
import Recommend from './homeChild/Recommend.vue'
import Rank from './homeChild/Rank.vue'
import Like from './homeChild/Like.vue'
import Floor from './homeChild/Floor'
import Brand from './homeChild/Brand.vue'
// vuex辅助函数
import { mapActions, mapState } from 'vuex'
export default {
  name: 'Home',
  data () {
    return {}
  },
  props: {},
  components: {
    TypeNav,
    ListContainer,
    Recommend,
    Rank,
    Like,
    Floor,
    Brand
  },
  computed: {
    ...mapState('home', ['floorList'])
  },
  watch: {},
  created () {
    this.onGetFloorList()
  },
  mounted () {},
  methods: {
    ...mapActions('home', ['onGetFloorList'])
  }
}
</script>

<style scoped lang="less"></style>
